/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.workflow.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.hera.base.domain.BaseDomain;
import com.hera.process.security.domain.User;

/**
 *
 * @author cmontes
 */
@Entity
@Table(name = "PROCESS_GROUP")
@SequenceGenerator(name="SEC_processgroup", sequenceName="SEQ_PROCESSGROUP")
public class ProcessGroup extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PROCESS_GROUP")
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEC_processgroup")
    private Long idProcessGroup;
    private String name;
    private String description;
    @Transient
    private List<User> sysUserList;

    public ProcessGroup() {
    }

    public ProcessGroup(Long idProcessGroup) {
        this.idProcessGroup = idProcessGroup;
    }

    public Long getIdProcessGroup() {
        return idProcessGroup;
    }

    public void setIdProcessGroup(Long idProcessGroup) {
        this.idProcessGroup = idProcessGroup;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<User> getSysUserList() {
        return sysUserList;
    }

    public void setSysUserList(List<User> sysUserList) {
        this.sysUserList = sysUserList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idProcessGroup != null ? idProcessGroup.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof ProcessGroup)) {
            return false;
        }
        ProcessGroup other = (ProcessGroup) object;
        if ((this.idProcessGroup == null && other.idProcessGroup != null) || (this.idProcessGroup != null && !this.idProcessGroup.equals(other.idProcessGroup))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.ProcessGroup[ idProcessGroup=" + idProcessGroup + " ]";
    }
    
}
